<?php


namespace app\wechat\validate;


use think\Validate;

class Bookstore extends Validate
{
    protected $rule=[
        'name|书店名称'=>'require|max:20',
        'head_img|头像'=>'require',
        'slogan|标语'=>'require|max:20',
        'begin_time|营业时间'=>'require',
        'end_time|营业时间'=>'require',
        'rest_time|店休日'=>'require',
        'owner|主理人'=>'require|max:20',
        'phone|联系方式'=>'require|max:11',
        'address|地址'=>'require',
        'type|类型'=>'require',
        'serve|可提供服务'=>'require',
        'img|书店图片'=>'require',
        'detail|详细介绍'=>'require'
    ];
    protected $message=[
        'name.require'=>'请填写书店名称',
        'name.max'=>'书店名称过长',
        'head_img.require'=>'请上传头像',
        'slogan.require'=>'请填写标语',
        'slogan.max'=>'标语过长',
        'open_time.require'=>'请选择营业时间',
        'rest_time.require'=>'请选择店休日',
        'owner.require'=>'请填写主理人',
        'owner.max'=>'主理人字数过长',
        'phone.require'=>'请填写联系方式',
        'phone.max'=>'联系方式过长',
        'address.require'=>'请填写地址',
        'type.require'=>'请选择类型',
        'serve.require'=>'请选择服务',
        'img.require'=>'请上传图片',
        'detail.require'=>'请填写详情',

    ];
    protected $scene=[
        'one'=>['name','head_img','slogan','open_time','rest_time','owner','phone','address','type','serve','img','detail'],
        'two'=>['open_time','rest_time','type','serve'],
    ];
}